import numpy as np

array = np.random.randint(low=1, high=1000, size=10)

print(array)


def shell_sort(a: list) -> object:
    dk = len(a) // 2
    while dk >= 1:
        i = dk
        while i < len(a):
            if a[i] < a[i - dk]:
                j = i - dk
                x = a[i]
                while j >= 0 and x < a[j]:
                    a[j + dk] = a[j]
                    j -= dk
                a[j + dk] = x
            i += 1
        dk //= 2
    return a


shell_sort(array)

print(array)
